package summer.codegenerator.service.base;

import org.apache.commons.io.FileUtils;
import org.springframework.stereotype.Service;

import java.io.File;
import java.io.IOException;

@Service
public class CodegeneratorServiceImpl implements CodegeneratorService {

    @Override
    public String getProject(String rootFolderName, String packageName) throws IOException {

        File folder = new File(rootFolderName);
        if(folder.isFile()) {
            return null;
        }
        if(folder.exists()) {
            FileUtils.deleteDirectory(folder);
        } else {
            folder.mkdirs();
        }
        // 清空并新建目录







        return null;
    }
}
